/*******************************************************************************
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *  
 * Copyright (c) 2011 Michael Chan.
 ******************************************************************************/
package com.google.code.solrdimension.test.services;

import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;


/**
 * All unit tests uses the {@link SolrServiceImpl} to interact with the {@link SolrServer}
 * 
 * @author mhc
 *
 */
public interface SolrService {
    
    /**
     * Returns a solr server
     * @throws SolrServerException if any issue connecting to the server
     * @return
     */
    public SolrServer getSolrServer() throws SolrServerException;
    
    /**
     * Ask SOLR to rebuild the index
     * @throws SolrServerException if the server is in error state or cannot connect to the server
     * @return True if the index is rebuilt successfully
     * @throws Exception 
     */
    public boolean rebuildIndex() throws Exception;
    
    
}
